// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.OrderPicking;
import com.fowo.api.model.order.picking.OrderPickingItemVo;
import com.fowo.api.model.order.picking.OrderPickingSearchParamPo;
import com.fowo.api.model.order.picking.OrderPickingVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OrderPickingMapper extends BaseMapper<OrderPicking> {
  Page<OrderPickingItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") OrderPickingSearchParamPo search
  );
  List<OptionItem<OrderPickingItemVo>> searchOptions(
    @Param("search") OrderPickingSearchParamPo search
  );
  List<OrderPickingItemVo> search(
    @Param("search") OrderPickingSearchParamPo search
  );
  Date searchLastUpdateTime(@Param("search") OrderPickingSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") OrderPickingSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") OrderPickingSearchParamPo search);
  Long getIdByOriginalOrderId(@Param("originalOrderId") String originalOrderId);

  List<Long> getIdsByOriginalOrderId(@Param("list") List<String> list);

  String getOriginalOrderIdById(@Param("id") Long id);

  List<Map<String, Object>> getOriginalOrderIdByIds(
    @Param("ids") List<Long> ids
  );
  OrderPickingVo selectVoById(@Param("id") Long id);
  /**
   * 打单拣货
   */
  List<OrderPickingItemVo> orderPickingrOrder(
    @Param("search") OrderPickingSearchParamPo search
  );

  /**
   * 获取打单拣货编号列表
   */
  List<Long> orderPickingrOrderIds(
    @Param("search") OrderPickingSearchParamPo search
  );

  /**
   * 获取打单拣货的总数
   */
  Long orderPickingrOrderCount(
    @Param("search") OrderPickingSearchParamPo search
  );

  /**
   * 打单拣货分页
   */
  Page<OrderPickingItemVo> orderPickingrOrderPage(
    @Param("page") Page page,
    @Param("search") OrderPickingSearchParamPo search
  );
  Date orderPickingrOrderLastUpdateTime(
    @Param("search") OrderPickingSearchParamPo search
  );
}
